package com.qidian.mes.md.controller;

import com.qidian.mes.md.service.UploadFileService;
import com.qidian.mes.util.pojo.QdResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

/**
 * @Author: CoolPro
 * @Description:
 * @Time: 2024-04-12 09:26
 **/
@RestController
@RequestMapping("/upload")
@CrossOrigin
public class UpLoadFileController {
    @Autowired
    private UploadFileService uploadFileService;
    @RequestMapping("/image")
    public QdResult uploadImage(@RequestParam("file") MultipartFile file) {
        return uploadFileService.uploadImage(file);
    }
}
